Skip to content

Fix gl2d snapshot rendering #572

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

mikolalysenko
Copy link
Contributor

@etpinard
Copy link
Contributor

Great. Looks like a solid first step. 🎉

Unfortunately, npm run test-image (after removing this line) is still struggling.

Running individual tests e.g. npm run test-image -- gl2d_stacked_subplots.json seems to behave fine. But, running multiple tests in a row leads to misplaced axes, hover spikes showing, and sometimes, even blank canvases.

@mikolalysenko Luckily, the problem is reproducible from within the test dashboard, by pasting the following in the console:

var list = [
  'gl2d_10',
  'gl2d_12',
  'gl2d_14',
  'gl2d_17',
  'gl2d_22',
  'gl2d_24',
  'gl2d_28',
  'gl2d_30',
  'gl2d_32',
];

list.forEach(function(mock) {
  Tabs.getMock(mock, function(err, fig) {
    var gd = Tabs.fresh(mock);  // appends new graph div with id set to mock name

    Plotly.plot(gd, fig.data, fig.layout).then(function() {
      Plotly.downloadImage(gd).then(function() {
        Plotly.purge(gd);  // this destroys the scene2d instances too!
        gd.parentNode.removeChild(gd);
      });
    });

  });
});

You can also use Plotly.toImage instead of Plotly.downloadImage to inspect the resulting dataURL.

Adding @monfera and @bpostlethwaite to the conversation who may have some insights on the problem.

@etpinard
Copy link
Contributor

closed in favor of #735

@etpinard etpinard closed this Jul 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants